package cz.proks.easyhelpdesk.gwt.ui.widget;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;

import cz.proks.easyhelpdesk.gwt.event.LeftArrowClickEvent.Handler;

public class Pager extends Composite implements IsWidget {

    private static PagerUiBinder uiBinder = GWT.create(PagerUiBinder.class);

    interface PagerUiBinder extends UiBinder<Widget, Pager> {
    }
           
    @UiField Counter counter;
    @UiField LeftRightHyperlinkButton leftRightHyperlinkButton;
    
    public Pager() {
        initWidget(uiBinder.createAndBindUi(this));        
    }    
    
    public HandlerRegistration addLeftArrowClickHandler(Handler handler) {
        return leftRightHyperlinkButton.addLeftArrowClickHandler(handler);
    }

    public HandlerRegistration addRightArrowClickHandler(cz.proks.easyhelpdesk.gwt.event.RightArrowClickEvent.Handler handler) {
        return leftRightHyperlinkButton.addRightArrowClickHandler(handler);
    }

    public Long getStartCount() {
        return counter.getStartCount();
    }

    public void setStartCount(Long value) {
        counter.setStartCount(value);
    }

    public Long getEndCount() {
        return counter.getEndCount();
    }

    public void setEndCount(Long value) {
        counter.setEndCount(value);
    }

    public Long getComplexCount() {
        return counter.getComplexCount();
    }

    public void setComplexCount(Long value) {
        counter.setComplexCount(value);
    }        
}
